<template>
    <div class="right-content">
        <el-tabs v-model="activeName" type="border-card">
            <el-tab-pane label="我的公文" name="nowdoc">
              <now-doc></now-doc>
            </el-tab-pane>
            <el-tab-pane label="历史公文" name="pastdoc">
              <past-doc></past-doc>
            </el-tab-pane>
            <el-tab-pane label="待我审批" name="waitdoc">
              <wait-doc></wait-doc>
            </el-tab-pane>
            <el-tab-pane label="抄送我的 " name="enddoc">
              <end-doc></end-doc>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import NowDoc from './NowDoc.vue'
import PastDoc from './PastDoc.vue'
import WaitDoc from './WaitDoc.vue'
import EndDoc from './EndDoc.vue'
export default {
  name: 'Docs',
  data() {
    return {
      activeName: 'nowdoc'
    }
  },
  components: {
    NowDoc,
    PastDoc,
    WaitDoc,
    EndDoc
  },
  methods: {
    // 选项卡切换
    handleClick(tab, event) {
      console.log(tab, event)
      if (tab.name === 'nowdoc') {
        this.getDataList2()
      } else
      if (tab.name === 'pastdoc') {
        this.getDataListHistory()
      } else if (tab.name === 'waitdoc') {
        this.getDataList4()
      } else if (tab.name === 'enddoc') {
        this.getDataList3()
      }
    }
  }
}
</script>

<style scoped>
</style>

